<template>
  <div id="app">
<!--    <Index></Index>-->
    <router-view></router-view>
  </div>
</template>

<script>


export default {
  name: 'App',
  components: {

  },
  data(){
    return{
      user:JSON.parse(sessionStorage.getItem("user"))
    }
  },
  watch:{
    '$store.state.menu':{
      handler(val,old){
        if(!old && this.user && this.user.id){
          this.$store.commit("setRoute",val)
        }
      },
      immediate:true
    }
  }
}
</script>

<style>
#app {

}
</style>
